package leetcode;

/**
 * @author ht
 * @create 2025-06-23 21:59
 * @desc
 **/
public class T343 {

    public int integerBreak(int n) {
        
        if(n == 2) {
            return 1;
        }
        if(n == 3) {
            return 2;
        }
        
        int sum = 1;
        while (n > 4) {
            n -= 3;
            sum *= 3;
        }
        sum *= n;
        return sum;
    }
}
